import $http from "@/utils/httpRequest";
export default {
  // 登录验证码获取
  captchaImage(data) {
    return $http({
      url: $http.adornUrl("/system/captchaImage"),
      method: "get",
      noAuthorization: true,
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  login(data) {
    return $http({
      url: $http.adornUrl("/system/login"),
      method: "post",
      contentType: "json",
      noAuthorization: true,
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 登录用户信息-获取
  getInfo(data) {
    return $http({
      url: $http.adornUrl("/system/getInfo"),
      method: "get",
      // contentType:'json',
      // data: $http.adornData({
      //   ...data
      // },false,'json')
    });
  },

  // 导航菜单（路由）
  getRouters(data) {
    return $http({
      url: $http.adornUrl("/system/getRouters"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // ---- 首页 - 统计  ---

  // 首页-订单统计）
  homePageOrder(data) {
    return $http({
      url: $http.adornUrl("/web/tradeRecord/homePageOrder"),
      method: "get",
      contentType: "json",
      data: $http.adornData({
        ...data,
      }),
    });
  },
  // 首页-运营角色 （只有运营商端）
  homePageRole(data) {
    return $http({
      url: $http.adornUrl("/web/operator/homePageRole"),
      method: "get",
      contentType: "json",
      data: $http.adornData({
        ...data, //json模式
      }),
    });
  },
  // 首页-设备信息
  homeDeviceInfo(data) {
    return $http({
      url: $http.adornUrl("/web/device/homePageRole"),
      method: "get",
      contentType: "json",
      data: $http.adornData({
        ...data,
      }),
    });
  },
  // 首页-折线图
  orderLineChart(data) {
    return $http({
      url: $http.adornUrl("/web/tradeRecord/orderLineChart"),
      method: "get",
      // contentType: 'json',
      params: $http.adornParams({
        ...data, //表单模式
      }),
    });
  },
  // 首页-统计本月本周同比
  orderStatistics(data) {
    return $http({
      url: $http.adornUrl("/web/tradeRecord/orderStatistics"),
      method: "get",
      // contentType: 'json',
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 管理员列表
  user_list(data) {
    return $http({
      url: $http.adornUrl("/system/user/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 添加管理员
  user_save(data) {
    return $http({
      url: $http.adornUrl("/system/user/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 编辑管理员
  user_update(data) {
    return $http({
      url: $http.adornUrl("/system/user/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 角色列表
  getRoleList(data) {
    return $http({
      url: $http.adornUrl("/system/role/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 删除管理员账号
  user_delete(data) {
    return $http({
      url: $http.adornUrl("/system/user/delete/" + data.userId),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },
  // 代理商个人信息
  webAgent(id) {
    return $http({
      url: $http.adornUrl(`/web/agent/${id}`),
      method: "get",
      contentType: "json",
    });
  },
  //  新增代理商银行卡信息
  webAgentSaveBank(data) {
    return $http({
      url: $http.adornUrl("/web/agent/saveBank"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 修改代理商银行卡信息
  webAgentUpdateBank(data) {
    return $http({
      url: $http.adornUrl("/web/agent/updateBank"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 修改代理商个人信息
  webAgentUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/agent/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 删除代理商个人信息
  webAgentDel(id) {
    return $http({
      url: $http.adornUrl(`/web/agent/del/${id}`),
      method: "get",
      contentType: "json",
    });
  },

  // 运营商获取所有代理商个人信息
  agentOperatora(id) {
    return $http({
      url: $http.adornUrl(`/web/agent/operatora/${id}`),
      method: "get",
      contentType: "json",
    });
  },

  // apk版本管理查询
  appVersion_list(data) {
    return $http({
      url: $http.adornUrl("/web/appVersion/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // apk版本更新
  appVersion_updata(data) {
    return $http({
      url: $http.adornUrl("/web/appVersion/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 设备报警信息页面
  // 设备报警 分页查询设备列表
  getDeviceWarningListss(pageNum, pageSize, data) {
    return $http({
      url: $http.adornUrl(
        `/web/deviceWarning/getDeviceWarningList/?pageNum=${pageNum}&pageSize=${pageSize}`
      ),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  //  通过ID查询设备告警详情信息
  getDeviceWarningss(id) {
    return $http({
      url: $http.adornUrl(`/web/deviceWarning/getDeviceWarning/${id}`),
      method: "get",
      // params: $http.adornParams({
      //   ...data,
      // }),
    });
  },
  // 修改设备告警信息
  editDeviceWarning(data) {
    return $http({
      url: $http.adornUrl("/web/deviceWarning/editDeviceWarning"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 新增设备告警信息
  addDeviceWarning(data) {
    return $http({
      url: $http.adornUrl("/web/deviceWarning/addDeviceWarning"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 通过ID删除设备警告信息
  delDeviceWarning(id, data) {
    return $http({
      url: $http.adornUrl(`/web/deviceWarning/delDeviceWarning/${id}`),
      method: "get",
      contentType: "json",
      params: $http.adornParams({
        ...data, //表单模式
      }),
    });
  },

  // 设备二维码下发
  deviceSettingSetQRCode(data) {
    return $http({
      url: $http.adornUrl(`/web/deviceSetting/setQRCode?deviceNo=${data}`),
      method: "post",
      contentType: "json",
      // data: $http.adornData({
      //   ...data,
      // }),
    });
  },

  // 设备-新增
  device_save(data) {
    return $http({
      url: $http.adornUrl("/web/device/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 设备-编辑
  device_updata(data) {
    return $http({
      url: $http.adornUrl("/web/device/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 设备列表
  device_list(data) {
    return $http({
      url: $http.adornUrl("/web/device/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 设备-删除
  device_del(data) {
    return $http({
      url: $http.adornUrl("/web/device/del/" + data.id),
      method: "post",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 设备-查看仓门
  device_channelList(data) {
    return $http({
      url: $http.adornUrl("/web/device/channelList"),
      method: "get",
      // contentType: "json",
      // noLoading: true,
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 仓门--启用/禁用
  device_updateDisable(data) {
    return $http({
      url: $http.adornUrl("/web/device/updateDisable"),
      method: "post",
      data: $http.adornData({
        ...data,
      }),
    });
  },

  // 设备-导入模板下载
  importTemplate(data) {
    return $http({
      url: $http.adornUrl("/web/device/importTemplate"),
      method: "get",
      // contentType:'json',
      // data: $http.adornData({
      //   ...data
      // },false,'json')
    });
  },

  // 充电柜充电记录  excel模板导出
  deviceLogExport() {
    return $http({
      url: $http.adornUrl("/web/deviceLog/export"),
      method: "get",
      // contentType: 'json',
      // params: $http.adornParams({
      //   ...data, //表单模式
      // }),
    });
  },

  // 充电柜充电记录  换电柜换电记录
  deviceLog_list(data) {
    return $http({
      url: $http.adornUrl("/web/deviceLog/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 异常记录
  alarm_list(data) {
    return $http({
      url: $http.adornUrl("/web/alarm/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 异常记录-删除
  alarm_del(data) {
    return $http({
      url: $http.adornUrl("/web/alarm/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 运营商-新增
  operator_save(data) {
    return $http({
      url: $http.adornUrl("/web/operator/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运营商-编辑
  operator_updata(data) {
    return $http({
      url: $http.adornUrl("/web/operator/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运营商-删除
  operator_del(data) {
    return $http({
      url: $http.adornUrl("/web/operator/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },
  // 运营商-详情
  operator_detail(data) {
    return $http({
      url: $http.adornUrl("/web/operator/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 运营商-列表
  operator_list(data) {
    return $http({
      url: $http.adornUrl("/web/operator/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 省市区街接口
  allAddressList(data) {
    return $http({
      url: "https://chargepole-yh.yunheznkj.com/common/v1.0/administrative",
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 站点-列表
  site_list(data) {
    return $http({
      url: $http.adornUrl("/web/site/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 站点-新增
  site_save(data) {
    return $http({
      url: $http.adornUrl("/web/site/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 站点-编辑
  site_updata(data) {
    return $http({
      url: $http.adornUrl("/web/site/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 站点-删除
  site_del(data) {
    return $http({
      url: $http.adornUrl("/web/site/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 获取代理商下的站点列表
  siteAgentList(data) {
    return $http({
      url: $http.adornUrl(`/web/site/agentList?agentId=${data}`),
      method: "get",
    });
  },

  // 代理商-列表
  agent_list(data) {
    return $http({
      url: $http.adornUrl("/web/agent/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 代理商-新增
  agent_save(data) {
    return $http({
      url: $http.adornUrl("/web/agent/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 代理商-编辑
  agent_updata(data) {
    return $http({
      url: $http.adornUrl("/web/agent/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 代理商-删除
  agent_delete(data) {
    return $http({
      url: $http.adornUrl("/web/agent/del/" + data.id),
      method: "get",
    });
  },

  // 电池类型-列表
  batteryTypeList(data) {
    return $http({
      url: $http.adornUrl("/web/batteryType/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 电池类型-新增
  batteryType_save(data) {
    return $http({
      url: $http.adornUrl("/web/batteryType/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池类型-编辑
  batteryType_updata(data) {
    return $http({
      url: $http.adornUrl("/web/batteryType/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池类型-删除
  batteryType_del(data) {
    return $http({
      url: $http.adornUrl("/web/batteryType/del/" + data.id),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 电池-列表
  battery_list(data) {
    return $http({
      url: $http.adornUrl("/web/battery/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 电池-新增
  battery_save(data) {
    return $http({
      url: $http.adornUrl("/web/battery/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池-编辑
  battery_updata(data) {
    return $http({
      url: $http.adornUrl("/web/battery/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池-详情
  battery_detail(data) {
    return $http({
      url: $http.adornUrl(`/web/battery/${data.id}`),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 电池押金-列表
  deposit_list(data) {
    return $http({
      url: $http.adornUrl("/web/deposit/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 电池押金-新增
  deposit_save(data) {
    return $http({
      url: $http.adornUrl("/web/deposit/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池押金-详情
  deposit_info(data = {}) {
    return $http({
      url: $http.adornUrl("/web/deposit/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 电池押金-编辑
  deposit_updata(data) {
    return $http({
      url: $http.adornUrl("/web/deposit/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 电池押金-删除
  deposit_del(data) {
    return $http({
      url: $http.adornUrl("/web/deposit/del/" + data.id),
      method: "get",
    });
  },

  // 充值套餐-列表
  settingTopup_list(data) {
    return $http({
      url: $http.adornUrl("/web/settingTopup/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 充值套餐-新增
  settingTopup_save(data) {
    return $http({
      url: $http.adornUrl("/web/settingTopup/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 充值套餐-编辑
  settingTopup_updata(data) {
    return $http({
      url: $http.adornUrl("/web/settingTopup/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 充值套餐-删除
  settingTopup_del(data) {
    return $http({
      url: $http.adornUrl("/web/settingTopup/del/" + data.id),
      method: "get",
    });
  },
  // 充值套餐-赠送余额功能-开启/关闭
  settingTopup_startOrStop(data) {
    return $http({
      url: $http.adornUrl("/web/settingTopup/startOrStop"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 新用户赠送设置-详情
  settingGive_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/settingGive/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 新用户赠送设置-新增或修改
  settingGive_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/settingGive/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 充电业务基础设置-详情
  settingCharge_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/settingCharge/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 充电业务基础设置-新增或修改
  settingCharge_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/settingCharge/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 换电业务基础设置-详情
  settingExchange_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/settingExchange/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 换电业务基础设置-新增或修改
  settingExchange_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/settingExchange/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 租车业务基础设置-详情
  settingRent_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/settingRent/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 租车业务基础设置-新增或修改
  settingRent_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/settingRent/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 协议文本 查询
  protocolGuide_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/protocolGuide/getInfo/" + data.type),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },
  // 新增或编辑
  protocolGuide_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/protocolGuide/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 平台信息-查询
  aboutUs_getInfo(data) {
    return $http({
      url: $http.adornUrl("/web/aboutUs/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 平台信息_新增或编辑
  aboutUs_saveOrUpdate(data) {
    return $http({
      url: $http.adornUrl("/web/aboutUs/saveOrUpdate"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 日志列表查询
  operlog_list(data) {
    return $http({
      url: $http.adornUrl("/monitor/operlog/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 换电套餐-列表
  mealExchange_list(data) {
    return $http({
      url: $http.adornUrl("/web/mealExchange/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 换电套餐-新增
  mealExchange_save(data) {
    return $http({
      url: $http.adornUrl("/web/mealExchange/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 换电套餐-编辑
  mealExchange_updata(data) {
    return $http({
      url: $http.adornUrl("/web/mealExchange/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 换电套餐-删除
  mealExchange_del(data) {
    return $http({
      url: $http.adornUrl("/web/mealExchange/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 月卡套餐 ---列表
  mealList(data) {
    return $http({
      url: $http.adornUrl("/web/meal/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 月卡套餐 ---删除套餐
  mealRemove(data) {
    return $http({
      url: $http.adornUrl(`/web/meal/remove/${data}`),
      method: "get",
    });
  },

  // 月卡套餐 ---启用/禁用套餐
  mealEnable(id, status) {
    return $http({
      url: $http.adornUrl(`/web/meal/enable/${id}/${status}`),
      method: "post",
    });
  },

  //月卡套餐 ---新增
  mealSave(data) {
    return $http({
      url: $http.adornUrl("/web/meal/save"),
      contentType: "json",
      method: "post",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json" //josn模式
      ),
    });
  },
  // 导入excel赠送套餐
  mealGiveMealImport(data) {
    return $http({
      url: $http.adornUrl("/web/meal/giveMealImport"),
      contentType: "json",
      method: "post",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json" //josn模式
      ),
    });
  },

  // 导出赠送记录模板
  publicGive_meal_phone() {
    return $http({
      url: $http.adornUrl(`/profile/public/give_meal_phone.xlsx`),
      method: "get",
    });
  },

  // 赠送记录
  mealGiveRecordList(data) {
    return $http({
      url: $http.adornUrl(`/web/mealGiveRecord/list`),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 导出记录
  mealGiveRecordExport(data) {
    return $http({
      url: $http.adornUrl(`/web/mealGiveRecord/export`),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 给用户赠送套餐
  mealGiveMeal(data) {
    return $http({
      url: $http.adornUrl("/web/meal/giveMeal"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  //月卡套餐 ---修改
  mealEdit(data) {
    return $http({
      url: $http.adornUrl("/web/meal/edit"),
      contentType: "json",
      method: "post",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json" //josn模式
      ),
    });
  },
  // 充电套餐-新增---功率
  MealBaseRate(data) {
    return $http({
      url: $http.adornUrl("/web/MealBaseRate/save"),
      contentType: "json",
      method: "post",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json" //josn模式
      ),
    });
  },

  // 充电套餐-列表
  mealCharge_list(data) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 充电套餐列表页面--编辑按钮
  webMealCharge(id) {
    return $http({
      url: $http.adornUrl(`/web/mealCharge/${id}`),
      method: "get",
    });
  },
  // 充电套餐列表页面--编辑按钮--按电量收费删除按钮
  webMealBaseRateDel(id) {
    return $http({
      url: $http.adornUrl(`/web/MealBaseRate/del/${id}`),
      method: "get",
    });
  },
  // 充电套餐-新增
  mealCharge_save(data) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 充电套餐-编辑
  mealCharge_update(data) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 充电套餐-删除
  mealCharge_del(data) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },
  // 租车套餐-列表
  mealRent_list(data) {
    return $http({
      url: $http.adornUrl("/web/mealRent/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 租车套餐-新增
  mealRent_save(data) {
    return $http({
      url: $http.adornUrl("/web/mealRent/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 租车套餐-编辑
  mealRent_updata(data) {
    return $http({
      url: $http.adornUrl("/web/mealRent/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 租车套餐-删除
  mealRent_del(data) {
    return $http({
      url: $http.adornUrl("/web/mealRent/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 用户列表
  user_list2(data) {
    return $http({
      url: $http.adornUrl("/web/user/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 用户详情
  userDetails(data) {
    return $http({
      url: $http.adornUrl("/web/user/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // IC卡-新增
  ic_save(data) {
    return $http({
      url: $http.adornUrl("/web/ic/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // IC卡列表
  ic_list(data) {
    return $http({
      url: $http.adornUrl("/web/ic/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // IC卡-删除
  ic_del(data) {
    return $http({
      url: $http.adornUrl("/web/ic/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // IC卡-导入模板excel下载
  importTemplate2(data) {
    return $http({
      url: $http.adornUrl("/web/ic/importTemplate"),
      method: "get",
    });
  },

  // IC卡-使用记录
  ic_useList(data) {
    return $http({
      url: $http.adornUrl("/web/ic/useList"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // IC卡-充值
  updateUserWallet(data) {
    return $http({
      url: $http.adornUrl("/web/ic/updateUserWallet"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运维列表
  maintenancer_list(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 查询该运维人员绑定的站点
  maintenancerSiteList(data) {
    return $http({
      url: $http.adornUrl(`/web/maintenancer/siteList?id=${data}`),
      method: "get",
    });
  },

  // 运维人员绑定站点
  maintenancerBindSite(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/bindSite"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运维-添加
  maintenancer_save(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运维-编辑
  maintenancer_updata(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 运维-删除
  maintenancer_del(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 运维_操作记录
  maintenancer_oprList(data) {
    return $http({
      url: $http.adornUrl("/web/maintenancer/oprList"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 广告合集-列表
  advertBox_list(data) {
    return $http({
      url: $http.adornUrl("/web/advertBox/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 广告合集-新增
  advertBox_save(data) {
    return $http({
      url: $http.adornUrl("/web/advertBox/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告合集-编辑
  advertBox_updata(data) {
    return $http({
      url: $http.adornUrl("/web/advertBox/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告合集-删除
  advertBox_del(data) {
    return $http({
      url: $http.adornUrl("/web/advertBox/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 广告-列表
  advert_list(data) {
    return $http({
      url: $http.adornUrl("/web/advert/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 广告-新增
  advert_save(data) {
    return $http({
      url: $http.adornUrl("/web/advert/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 广告-编辑
  advert_updata(data) {
    return $http({
      url: $http.adornUrl("/web/advert/update"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告-删除
  advert_del(data) {
    return $http({
      url: $http.adornUrl("/web/advert/del/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 广告合集-新增广告
  advertList_add(data) {
    return $http({
      url: $http.adornUrl("/web/advertList/add"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告合集-已关联广告列表
  advertList_list(data) {
    return $http({
      url: $http.adornUrl("/web/advertList/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 广告合集-取消关联广告
  advertList_cancel(data) {
    return $http({
      url: $http.adornUrl("/web/advertList/cancel"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告合集-已关联设备列表
  advertDevice_deviceList(data) {
    return $http({
      url: $http.adornUrl("/web/advertDevice/deviceList"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 广告合集-新增关联设备
  advertDevice_save(data) {
    return $http({
      url: $http.adornUrl("/web/advertDevice/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 广告合集-取消关联设备
  advertDevice_cancel(data) {
    return $http({
      url: $http.adornUrl("/web/advertDevice/cancel"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 设备报障列表
  fault_list(data) {
    return $http({
      url: $http.adornUrl("/web/fault/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 意见反馈列表
  feedback_list(data) {
    return $http({
      url: $http.adornUrl("/web/feedback/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 财务流水
  tradeRecord_list(data) {
    return $http({
      url: $http.adornUrl("/web/tradeRecord/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 套餐订单列表
  PackageOrderPost(data) {
    return $http({
      url: $http.adornUrl(`/web/mealOrder/list`),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 套餐订单导出
  mealOrderExport(data) {
    return $http({
      url: $http.adornUrl(`/web/mealOrder/export`),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 充值订单列表
  topupRecord_list(data) {
    return $http({
      url: $http.adornUrl("/web/topupRecord/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 充电订单列表
  orderCharge_list(data) {
    return $http({
      url: $http.adornUrl("/web/orderCharge/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 充电订单  excel模板导出
  orderChargeExport() {
    return $http({
      url: $http.adornUrl("/web/orderCharge/export"),
      method: "get",
      // contentType: 'json',
      // params: $http.adornParams({
      //   ...data, //表单模式
      // }),
    });
  },

  // 换电订单列表
  orderExchange_list(data) {
    return $http({
      url: $http.adornUrl("/web/orderExchange/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 租车订单列表
  orderRent_list(data) {
    return $http({
      url: $http.adornUrl("/web/orderRent/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 换电订单-结束换电
  orderExchange_endOrder(data) {
    return $http({
      url: $http.adornUrl("/web/orderExchange/endOrder/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 换电订单-更换电池
  orderExchange_replace(data) {
    return $http({
      url: $http.adornUrl("/web/orderExchange/replace"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 换电订单-归还电池
  orderExchange_giveBack(data) {
    return $http({
      url: $http.adornUrl("/web/orderExchange/giveBack/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 租车订单-结束
  orderRent_endOrder(data) {
    return $http({
      url: $http.adornUrl("/web/orderRent/endOrder/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 租车订单-更换车辆
  orderRent_replace(data) {
    return $http({
      url: $http.adornUrl("/web/orderRent/replace"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 租车订单-归还
  orderRent_giveBack(data) {
    return $http({
      url: $http.adornUrl("/web/orderRent/giveBack/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 充电订单-结束
  orderCharge_endOrder(data) {
    return $http({
      url: $http.adornUrl("/web/orderCharge/endOrder/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },
  // 充电订单-详情订单
  orderCharge_detailOrder(data) {
    return $http({
      url: $http.adornUrl("/web/orderCharge/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 充电订单-退款
  orderCharge_refundOrder(data) {
    return $http({
      url: $http.adornUrl("/web/orderCharge/refundOrder/" + data.id),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 代理商提现列表
  withdrawRecord_list(data) {
    return $http({
      url: $http.adornUrl("/web/withdrawRecord/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 代理商提现-通过/驳回
  withdrawRecord_check(data) {
    return $http({
      url: $http.adornUrl("/web/withdrawRecord/check"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 代理商提现-申请
  withdrawRecord_save(data) {
    return $http({
      url: $http.adornUrl("/web/withdrawRecord/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 代理商--提现记录详细信息
  withdrawRecordAgentId(agentId) {
    return $http({
      url: $http.adornUrl(`/web/withdrawRecord/agentId/${agentId}`),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  // 代理商提现-账户信息

  withdrawRecord_getAgentInfo(data) {
    return $http({
      url: $http.adornUrl("/web/withdrawRecord/getAgentInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 用户押金提现列表
  depositReturn_list(data) {
    return $http({
      url: $http.adornUrl("/web/depositReturn/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 用户押金提现-通过/驳回
  depositReturn_check(data) {
    return $http({
      url: $http.adornUrl("/web/depositReturn/check"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 租车套餐-已关联设备列表
  deviceMealShip_list(data) {
    return $http({
      url: $http.adornUrl("/web/deviceMealShip/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 充电套餐-解除关联设备
  mealCharge_delDevice(data) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/delDevice"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 租车套餐-解除关联设备
  deviceMealShip_del(data) {
    return $http({
      url: $http.adornUrl("/web/deviceMealShip/del"),
      method: "post",
      // contentType:'json',
      data: $http.adornData({
        ...data,
      }),
    });
  },

  // 租车套餐-关联设备
  deviceMealShip_save(data) {
    return $http({
      url: $http.adornUrl("/web/deviceMealShip/save"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },
  // 运营资料查询
  getOperateConfig(data) {
    return $http({
      url: $http.adornUrl("/web/operateConfig/getInfo"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },
  // 运营资料编辑
  editOperateConfig(data) {
    return $http({
      url: $http.adornUrl("/web/operateConfig/edit"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  showBtn(id, that) {
    if (that.$store.state.buttons[id]) {
      return true;
    } else {
      return false;
    }
  },

  setMonthCard(data) {
    return $http({
      url: $http.adornUrl("/web/user/addVip"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 查询未注册白名单列表
  getUnregisteredUser(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/getUnregisteredUser"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 查询已注册白名单列表
  registeredUser(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/registeredUser"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 未注册白名单 excel模板导出
  exportUnregisteredUser() {
    return $http({
      url: $http.adornUrl("/web/userWhite/exportUnregisteredUser"),
      contentType: "json",
      method: "post",
      data: {},
    });
  },
  // 已注册白名单 excel模板导出
  exportRegisteredUser(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/exportRegisteredUser"),
      contentType: "json",
      method: "post",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json" //josn模式
      ),
    });
  },

  // 白名单 查询所属代理商列表
  getWhiteList(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/getWhiteList"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 白名单 excel模板下载
  userWhite_download(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/importTemplate"),
      method: "get",
    });
  },
  // 白名单 excel模板导入
  userWhite_import(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/importData"),
      method: "post",
    });
  },
  // 白名单 添加
  userWhite_add(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/addWhiteByPhone"),
      method: "post",
      params: $http.adornParams({
        ...data, // 表单格式
      }),
    });
  },

  // 白名单 删除
  userWhite_del(data) {
    return $http({
      url: $http.adornUrl("/web/userWhite/delWhiteByPhone"),
      method: "post",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  cancelMonthCard(data) {
    return $http({
      url: $http.adornUrl("/web/user/deleteVip"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 获取设备列表信息
  getDeviceListInfo(data) {
    return $http({
      url: $http.adornUrl("/web/device/getDeviceListInfo"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 设备开仓
  deviceDoorPowerOn(data) {
    return $http({
      url: $http.adornUrl("/web/device/doorPowerOn"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  // 充换电柜详情信息
  cabinet_detailList(id, state) {
    return $http({
      url: $http.adornUrl(`/web/device/${id}/${state}`),
      method: "get",
    });
  },

  // 获取报警信息
  alarmGetList(data) {
    return $http({
      url: $http.adornUrl("/web/alarm/getList"),
      method: "post",
      contentType: "json",
      data: $http.adornData(
        {
          ...data,
        },
        false,
        "json"
      ),
    });
  },

  alarmGetList2(data) {
    return $http({
      url: $http.adornUrl("/web/alarm/list"),
      method: "get",
      params: $http.adornParams({
        ...data,
      }),
    });
  },

  // 充电套餐-详情
  mealCharge_detail(mealId) {
    return $http({
      url: $http.adornUrl("/web/mealCharge/" + mealId),
      method: "get",
      // params: $http.adornParams({
      //   ...data
      // })
    });
  },

  getOperatorList(data) {
    return $http({
      // url: $http.adornUrl("/web/mealCharge/getOperator"),
      // method: "post",
      // contentType: "json",
      // data: $http.adornData(
      //   {
      //     ...data,
      //   },
      //   false,
      //   "json"
      // ),
    });
  },
};
